home *** CD-ROM | disk | FTP | other *** search
/ Maclife 157 / MACLIFE157-2001-09.ISO.7z / MACLIFE157-2001-09.ISO / Linux / MacOS Tools / BootX 1.2.2 / Sources / lib / MoreSetup.h < prev   
Text File  |  2001-07-23  |  3KB  |  95 lines

  1. /*
  2.     File:        MoreSetup.h
  3.  
  4.     Contains:    Sets up conditions etc for MoreIsBetter.
  5.  
  6.     Written by:    Pete Gontier (PCG)
  7.  
  8.     Copyright:    Copyright ゥ 1998 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.  
  20.          <6>     2/11/99    PCG     add comments because Andy rightfully pointed out my original
  21.                                     attempts sucked; also, remove some excessive TARGET_CARBON
  22.                                     gymnastics
  23.          <5>     1/22/99    PCG     TARGET_CARBON
  24.          <4>    11/11/98    PCG     fix header
  25.          <3>    11/10/98    PCG     separate change histories
  26.          <2>    10/11/98    Quinn   Convert "MorePrefix.h" to "MoreSetup.h".
  27.          <1>    10/11/98    Quinn   Changed name from "MorePrefix.h" to "MoreSetup.h".
  28.  
  29.     Start of "MorePrefix.h" change history (most recent first):
  30.  
  31.          <3>     5/11/98    Quinn   Use MoreAssertQ instead of MoreAssert.
  32.          <2>     7/24/98    PCG        rid of triplet #includes
  33.          <2>     6/23/98    PCG     add copyright disclaimer stuff
  34.          <1>     6/23/98    PCG     initial checkin
  35. */
  36.  
  37. #pragma once
  38.  
  39.     //
  40.     //    We never want to use old names or locations.
  41.     //    Since these settings must be consistent all the way through
  42.     //    a compilation unit, and since we don't want to silently
  43.     //    change them out from under a developer who uses a prefix
  44.     //    file (C/C++ panel of Target Settings), we simply complain
  45.     //    if they are already set in a way we don't like.
  46.     //
  47.  
  48. #ifndef OLDROUTINELOCATIONS
  49. #    define OLDROUTINELOCATIONS 0
  50. #elif OLDROUTINELOCATIONS
  51. #    error OLDROUTINELOCATIONS must be FALSE when compiling MoreIsBetter.
  52. #endif
  53.  
  54. #ifndef OLDROUTINENAMES
  55. #    define OLDROUTINENAMES 0
  56. #elif OLDROUTINENAMES
  57. #    error OLDROUTINENAMES must be FALSE when compiling MoreIsBetter.
  58. #endif
  59.  
  60.     //
  61.     //    Almost every non-trivial module needs to detect
  62.     //    or produce errors, so we include it for the
  63.     //    convenience of all modules.
  64.     //
  65.  
  66. #include <Errors.h>
  67.  
  68.     //
  69.     //    We usually want asserions and other debugging code
  70.     //    turned on, but you can turn it all off if you like
  71.     //    by setting MORE_DEBUG to 0.
  72.     //
  73.  
  74. #ifndef MORE_DEBUG
  75. #    define MORE_DEBUG 1
  76. #endif
  77.  
  78.     //
  79.     //    Our assertion macros compile down to nothing if
  80.     //    MORE_DEBUG is not true. MoreAssert produces a
  81.     //    value indicating whether the assertion succeeded
  82.     //    or failed. MoreAssertQ is Quinn's flavor of
  83.     //    MoreAssert which does not produce a value.
  84.     //
  85.  
  86. #if MORE_DEBUG
  87. #    define MoreAssert(x) ¥
  88.         ((x) ? true : (DebugStr ("¥pMoreAssert failure: " #x), false))
  89. #    define MoreAssertQ(x) ¥
  90.         do { if (!(x)) DebugStr ("¥pMoreAssertQ failure: " #x); } while (false)
  91. #else
  92. #    define MoreAssert(x) (true)
  93. #    define MoreAssertQ(x)
  94. #endif
  95.